package com.ipDev.moyvSys;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ipDev.moyvSys.domain.po.Choice;
import com.ipDev.moyvSys.mapper.ChoiceMapper;
import com.ipDev.moyvSys.service.IChoiceService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;
import java.util.Map;

@SpringBootTest
@Slf4j

public class test4Choice {
    @Autowired
    private IChoiceService choiceService;

    @Autowired
    private ChoiceMapper choiceMapper;

    @Test
    public void test2() {
        Choice choice = Choice.builder().choiceChar("choice").image("example.com").problemId(1).description("des").build();
        choiceService.save(choice);
    }

    @Test
    public void test3(){
        Choice choice = Choice.builder().problemId(10).build();
        Map<String,Object> map=new HashMap<>();
        map.put("problem_id",10);
        choiceService.removeByMap(map);

    }
}
